package com.yuncheng.oaApi.service.impl;

import org.apache.commons.collections.CollectionUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yuncheng.common.base.service.impl.BaseServiceImpl;
import com.yuncheng.oaApi.constant.OaCommonFlowConstant;
import com.yuncheng.oaApi.entity.OaJobEntity;
import com.yuncheng.oaApi.mapper.OaSpcySqsxJobMapper;
import com.yuncheng.oaApi.service.IOaSpcySqsxJobService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 审评查验申请事项的流转记录
 * @Author: csx
 * @Date: 2023-03-01
 * @Version: V1.0
 */
@Service
public class OaSpcySqsxJobServiceImpl extends BaseServiceImpl<OaSpcySqsxJobMapper, OaJobEntity> implements IOaSpcySqsxJobService {

    @Override
        public String getSqsxLzjlHjmc(String sqsxId) {
        List<OaJobEntity> dbList = list(new LambdaQueryWrapper<OaJobEntity>()
                .eq(OaJobEntity::getFpid, sqsxId)
                .eq(OaJobEntity::getFblzt, OaCommonFlowConstant.BLZT_DB));
        String hjmc = "";
        if (CollectionUtils.isNotEmpty(dbList)){
            hjmc = dbList.get(0).getFhjmc();
        }
        return hjmc;
    }
}
